This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Generate a new "plugin with a view" project using the wizard. At the end of the createPartControl method in the generated ViewPart class add this:
int ops = DND.DROP_MOVE | DND.DROP_COPY;
Transfer[] transfers = new Transfer[] { XMLTransfer.getInstance() };
viewer.addDropSupport(ops, transfers, new ViewerDropAdapter(viewer){
public boolean validateDrop(Object target, int op, TransferData data)
{
return true;
}
public boolean performDrop(Object data)
{
for (URIDescriptor desc : (URIDescriptor[])data)
System.out.println("uri="+desc.uri+" label="+desc.label);
return true;
}
});
The XMLTransfer class requires a dependency on com.ibm.rcp.swtex. This will work with a drag from either an eclipse-rendered or a legacy view but the XMLTransfer class is marked deprecated so where, if anywhere, this is going in future is unclear. There is a disappointing lack of documentation once you get above the expeditor level.
Feedback response number MLES798NUN created by ~Jennifer Minjipymanader on 11/23/2007